package cn.dinxian.activiti.controller;

import javax.annotation.Resource;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

@RestController
public class OrderNacosController {
  @Resource
  private RestTemplate resetTemplate;
  
  @Value("${server-url.nacos-user-service}")
  private String url;

  @GetMapping("/consumer/getPayment/{id}")
  public String getPaymentInfo(@PathVariable("id") Long id) {
    return resetTemplate.getForObject(url+"/payment/getPayment/"+id,String.class);
  }
  

}